package cn.com.chengmandian.bike.controller;


import cn.com.chengmandian.bike.model.EbSettingArticle;
import cn.com.chengmandian.bike.service.IEbSettingArticleService;
import cn.com.chengmandian.core.web.pojo.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author AutoGenerator
 * @since 2021-12-21
 */
@Api(tags = "文章配置相关接口")
@RestController
@RequestMapping("/setting/article")
public class EbSettingArticleController {
    @Autowired
    private IEbSettingArticleService settingArticleService;

    @ApiOperation(value = "文章配置详情(无需登录)", notes = "1-用户协议 2-关于我们 3-骑行卡说明 4-充值协议")
    @GetMapping("/detail/{type}")
    public AjaxResult<EbSettingArticle> detail(@PathVariable("type") Integer type) {
        return AjaxResult.success(settingArticleService.getByType(type));
    }
}
